$f(x) = \begin{cases} 3x^2-1 & \text{for} ~~~~x\gt{0} \\ 6x-1& \text{for} ~~~~ x \leq0\end{cases}$ Evaluate the definite integral. $\int^1_{-1}f(x)\,dx = $ Choose 1 answer: Choose 1 answer: (Choice A) A $-4$ (Choice B) B $-2$ (Choice C) C $8$ (Choice D) D $12$
Answer: Splitting up the definite integral Since we're working with a piecewise function, we need to split the definite integral up into two pieces: $\phantom{=} \int^1_{-1}f(x)\,dx$ $= \int^1_{0}f(x)\,dx + \int^{0}_{-1}f(x)\,dx~~~~~~$ [Why did we split at 0?] $= \int^1_{0}(3x^2-1)\,dx + \int^{0}_{-1}(6x-1)\,dx ~~~~~~$ Evaluating each piece Next, let's evaluate each of these definite integrals one at a time. The first definite integral: $\begin{aligned} \int^1_{0}(3x^2-1)\,dx &=(x^3-x)\Bigg|^1_{{0}} \\\\ &= \left[ ( 1)^3 - (1)\right] - \left[(0)^3-({0})^2\right] \\\\ &= \left[0\right] -\left[0 \right] \\\\ &= {0}\end{aligned}$ The second definite integral: $\begin{aligned} \int^{0}_{-1}(6x-1)\,dx &=3x^2-x\Bigg|^0_{{-1}} \\\\ &= \left[3 \cdot( 0)^2-(0) \right] - \left[3 \cdot({-1})^2-({-1})\right] \\\\ &= \left[0\right] -\left[4 \right] \\\\ &= {-4}\end{aligned}$ Putting the pieces together Now let's add these two pieces together to find the answer: $\phantom{=} \int^1_{0}(3x^2-1)\,dx + \int^{0}_{-1}(6x-1)\,dx$ $ = {0} + ({-4})$ $ = -4$ The answer $\int^1_{-1}f(x)\,dx = -4$